home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 76 / MF_UK_76_1.iso / Education Feature / MicroWorlds 2.03 Try Me / MicroWorlds 2.03 Try Me.rsrc / TEXT_563_dotimes.txt < prev    next >
Encoding:
Text File  |  1998-05-08  |  543 b   |  17 lines

  1. dotimes range instruction-list
  2.  
  3. Runs the instruction list for each value specified in the range. The first input is a list with a temporary variable name and a maximum number. The second input is a list of instructions that uses the variable name included in the first input. In the following example, the instruction setbg sets the background color for each value of i, from 0 to 7.
  4.  
  5. Examples: 
  6.  
  7. dotimes [i 8] [setbg :i wait 5]
  8.  
  9. The following example displays 0, 1, 2, 3, ... to 9 in the Command Center.
  10.  
  11. dotimes [i 10] [show :i]
  12. 0
  13. 1
  14. 2
  15. ...
  16. 9
  17.